﻿
@model Tuple<First.Models.music, First.Models.music2>
@{
    ViewBag.Title = "Index";
}
@Model.Item1.name
@Model.Item2.name
<h2>Index</h2>
<script src="~/Scripts/jquery-1.8.3.min.js"></script>
<script src="~/Scripts/json2.js"></script>
<script src="~/Scripts/loadui.js"></script>
<link href="~/Content/loadui.css" rel="stylesheet" />
<script>
    $().ready(function () {
        loading2();
        $(document).ajaxStart(function () { ajaxshow() })
            .ajaxStop(function () { ajaxend() })
            .ajaxError(function () { ajaxend() });
    })
</script>
<div id="loading-div">
    <div id="loading_background" class="loading_background" style="display: none;"></div>
    <div id="loading_manage">
    </div>
</div>
<input type="button" onclick="testget()" value="测试"/>
<script>
    //$.ajax({
    //    type: "POST", //访问WebService使用Post方式请求
    //    //contentType: "application/json;charset=utf-8", //WebService 会返回Json类型
    //    //contentType: "application/xml;charset=utf-8", //WebService 会返回xml类型
    //   contenttype: "application/x-www-form-urlencoded",
    //    url: "http://119.145.71.86:8110/hisservice.asmx/get_report_detail", //调用WebService
    //    //url:"http://localhost:8026/WebService1.asmx/HelloWorld",
    //    data: {"regno": "171124101005"}, //Email参数
    //   // dataType: 'JSONP',
    //   // beforeSend: function (x) { x.setRequestHeader("Content-Type", "application/xml; charset=utf-8"); },
    //    success: function (response) {
    //        $.ajaxSetup(
    //            header('Access-Control-Allow-Origin:*')
    //        );
    //        var json = $(response).text();
    //        document.write(json);
    //    }
    //});
   testget= function() {
        $.ajax({
            type: "get",
            url: "@Url.Action("GetServiceResult","Index")",
            dataType: "json",
            data: {},
            success: function (data) {
                var res = data[0].name;
                alert(res);
            }
        })
    }
</script>
